package com.atguigu.spzx.product.controller;

import com.atguigu.spzx.common.result.Result;
import com.atguigu.spzx.product.service.impl.IndexServiceImpl;
import com.atguigu.spzx.product.vo.IndexQueryRespVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * IndexController
 * </p>
 *
 * @author flyduck
 * @since 2023/11/3
 */
@Api(tags = "首页管理接口")
@RestController
@RequestMapping("/api/product/index")
public class IndexController {

    @Autowired
    private IndexServiceImpl indexService;

    @ApiOperation("首页数据查询")
    @GetMapping
    public Result getIndexData(){
        IndexQueryRespVo respVo = indexService.getIndexData();
        return Result.ok(respVo);
    }


}
